package com.mccree.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class RouterController {
    @RequestMapping({"/","/index"})
    public String index(){
        return "index";
    }
    @RequestMapping("/toLogin")
    public String toLogin(){
        return "views/login";
    }
    @RequestMapping("/level1/{num}")
    public String leve1(@PathVariable("num")Integer num){
        return "views/level1/"+num;
    }
    @RequestMapping("/level2/{num}")
    public String leve2(@PathVariable("num")Integer num){
        return "views/level2/"+num;
    }
    @RequestMapping("/level3/{num}")
    public String leve3(@PathVariable("num")Integer num){
        return "views/level3/"+num;
    }
}
